<html>
	<head>
		<title>SEM数据库审计系统</title>
	<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
		<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
		<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="extjs/ext-all.js"></script>
  		<script type="text/javascript" src="js/lefttree.js"></script>
    	<script type="text/javascript" src="extjs/ux/TabCloseMenu.js"></script>
    	<script type="text/javascript" src="extjs/ux/fileuploadfield/FileUploadField.js"></script>

		<link rel="stylesheet" type="text/css" href="css/index.css"/>
		<link rel="stylesheet" type="text/css" href="extjs/ux/fileuploadfield/css/fileuploadfield.css"/>
	  	<link rel="stylesheet" type="text/css" title="blue"      href="extjs/resources/css/xtheme-blue.css" /> 
		<link rel="stylesheet" type="text/css" title="gray"      href="extjs/resources/css/xtheme-gray.css" />
		<link rel="stylesheet" type="text/css" title="access"    href="extjs/resources/css/xtheme-access.css" />
		<link rel="stylesheet" type="text/css" title="yourtheme" href="extjs/resources/css/yourtheme.css" />
		<script type="text/javascript" src="js/styleswitcher.js"></script>
		<script type="text/javascript" src="js/main.js"></script>
		<script type="text/javascript" src="js/warn.js"></script>
		<script type="text/javascript" src="js/warn_report.js"></script>
		<script type="text/javascript" src="js/log.js"></script>
		<script type="text/javascript" src="js/log_report.js"></script>
		<script type="text/javascript" src="js/server.js"></script>
		<script type="text/javascript" src="js/policy.js"></script>
		<script type="text/javascript" src="js/running.js"></script>
		<script type="text/javascript" src="js/probe.js"></script>
		<script type="text/javascript" src="js/manager.js"></script>
		<script type="text/javascript" src="js/syslog.js"></script>
		<script type="text/javascript" src="js/datestep.js"></script>
		<script type="text/javascript" src="js/sysinfo.js"></script>
		<script type="text/javascript" src="js/backup.js"></script>
		<script type="text/javascript" src="js/log_subscribe.js"></script>
		
		
		<script language='Javascript'>
			Ext.BLANK_IMAGE_URL = "extjs/resources/images/default/s.gif";
			Ext.chart.Chart.CHART_URL = 'extjs/resources/charts.swf';
			Ext.QuickTips.init();

			SetSysPath("${pageContext.request.contextPath}");
			Ext.onReady(function()
			{
				Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

				
			    var tb = new Ext.Toolbar({
				        items:[
				        '当前用户: admin',
				        '-',
				        {
				            text: '修改密码',
				            iconCls: 'modifypwd',
				            handler: function(){
				            	ModifyPassword();
				            }
				        },'-',{
				            text: '注销',
				            iconCls: 'logout',
				            handler: function(){
				               	var ret = confirm("你确定要退出系统吗?");
								if(ret) {
									LogoutSystem();
								}
				            }
				        }]
				});

				var topitem = new Ext.Panel({
					 layout:'fit',
			         border: false,
			         split:true,
			         bbar: tb,
			         autoScroll:true,
					 html: "<iframe src='title.html'  id='_title' name='_title' height=70 width=100% frameborder=no border=0 marginwidth=0 marginheight=0  allowtransparency=yes></iframe>"
				});

				var tabs = new Ext.TabPanel({
			        resizeTabs:true, 
			        minTabWidth: 115,
			        tabWidth:135,
			        enableTabScroll:true,
			        defaults: {autoScroll:true},
			        plugins: new Ext.ux.TabCloseMenu()
			        
		    	});

				function doLinkClose(){
					location.href="${pageContext.request.contextPath}/index.jsp";
				}
				function doLinkClick(id){
						AddMainTab(id,tabs);
				}
				
				var builds = new Array(
 							["1","未处理警告","tip"],
 							["2","已处理警告","tip"],
 							["3","全部警告","tip"],
 							["4","警告报表","count",
 								[
 									["1001","年报","count",
 										[
 											["1011","2010年报","count"],
 											["1012","2011年报","count"],
 											["1013","2012年报","count"]
 										]
 									],
 									["1002","季报","count",
 										[
 											["1021","2012年1季度报","count"],
 											["1022","2012年2季度报","count"],
 											["1023","2012年3季度报","count"]
 										]
 									],
 									["1003","月报","count",
 										[
 											["1031","2012年1月份报","count"],
 											["1032","2012年2月份报","count"],
 											["1033","2012年3月份报","count"],
 											["1034","2012年4月份报","count"],
 											["1035","2012年5月份报","count"],
 											["1036","2012年6月份报","count"],
 											["1037","2012年7月份报","count"]
 										]
 									],
 									["1004","周报","count",
 										[
 											["1041","2012年第1周报","count"],
 											["1042","2012年第2周报","count"],
 											["1043","2012年第3周报","count"],
 											["1044","2012年第4周报","count"],
 											["1045","2012年第5周报","count"],
 											["1046","2012年第6周报","count"],
 											["1047","2012年第7周报","count"],
 											["1048","2012年第8周报","count"],
 											["1049","2012年第9周报","count"]
 										]
 									],
 									["1005","日报","count",
 										[
 											["1051","2012年7月1日报","count"],
 											["1052","2012年7月2日报","count"],
 											["1053","2012年7月3日报","count"],
 											["1054","2012年7月4日报","count"],
 											["1055","2012年7月5日报","count"],
 											["1056","2012年7月6日报","count"],
 											["1057","2012年7月7日报","count"],
 											["1058","2012年7月8日报","count"]
 										]
 									]
 								
 								]
 							],
 							["16","报表订阅","filesend"]
 							
 						   );
				var warnTree = BuildTree(builds,doLinkClick);
				
				builds = new Array(
 							["5","全部日志","log"],							
 							["6","日志报表","count",
 								[
 									["6001","年报","count",
 										[
 											["6011","2010年报","count"],
 											["6012","2011年报","count"],
 											["6013","2012年报","count"]
 										]
 									],
 									["6002","季报","count",
 										[
 											["6021","2012年1季度报","count"],
 											["6022","2012年2季度报","count"],
 											["6023","2012年3季度报","count"]
 										]
 									],
 									["1003","月报","count",
 										[
 											["6031","2012年1月份报","count"],
 											["6032","2012年2月份报","count"],
 											["6033","2012年3月份报","count"],
 											["6034","2012年4月份报","count"],
 											["6035","2012年5月份报","count"],
 											["6036","2012年6月份报","count"],
 											["6037","2012年7月份报","count"]
 										]
 									],
 									["6004","周报","count",
 										[
 											["6041","2012年第1周报","count"],
 											["6042","2012年第2周报","count"],
 											["6043","2012年第3周报","count"],
 											["6044","2012年第4周报","count"],
 											["6045","2012年第5周报","count"],
 											["6046","2012年第6周报","count"],
 											["6047","2012年第7周报","count"],
 											["6048","2012年第8周报","count"],
 											["6049","2012年第9周报","count"]
 										]
 									],
 									["6005","日报","count",
 										[
 											["6051","2012年7月1日报","count"],
 											["6052","2012年7月2日报","count"],
 											["6053","2012年7月3日报","count"],
 											["6054","2012年7月4日报","count"],
 											["6055","2012年7月5日报","count"],
 											["6056","2012年7月6日报","count"],
 											["6057","2012年7月7日报","count"],
 											["6058","2012年7月8日报","count"]
 										]
 									]
 								
 								]
 							],
 							["17","报表订阅","filesend"]
 						   );
 				var logTree = BuildTree(builds,doLinkClick);

				builds = new Array(
							["7","服务器","server"]
 						   );
 				var serverTree = BuildTree(builds,doLinkClick);

				builds = new Array(
 							["8","探测器","subnet"]
 						   );
 				var snifferTree = BuildTree(builds,doLinkClick);
 				
				builds = new Array(
 							["9","预警策略","policy"]
 						   );
 				var policyTree = BuildTree(builds,doLinkClick);

				builds = new Array(
 							["10","运行状态","flow"],
 							["11","备份","save"],
 							["12","管理员","manager"],
 							["13","系统日志","sys_log"],
 							["14","设置及热备","info"],
 							["15","时间","time"]
 						   );
 				var systemTree = BuildTree(builds,doLinkClick);

				
 				
				var viewport = new Ext.Viewport({
					layout:'border',
					items:[{
						region: 'north',
						id: 'north-panel',
						height: 99,
						margins:'0 0 0 0',
						cmargins:'0 0 0 0',
						items:[topitem]
					},{
						region:'west',
						id:'west-panel',
						title:'管理',
						split:true,
						width: 200,
						minSize: 175,
						maxSize: 400,
						collapsible: true,
						margins:'5 0 5 5',
						cmargins:'35 5 5 5',
						layout:'accordion',

						layoutConfig:{
							animate:true
						},
						items: [
						{
							items:[warnTree],
							title:'警告',
							border:false,
							autoScroll:true,
							iconCls:'tips'
						},{
							items:[logTree],
							title:'日志',
							border:false,
							autoScroll:true,
							iconCls:'log'
						},{
							items:[serverTree],
							title:'服务器',
							border:false,
							autoScroll:true,
							iconCls:'server'
						},{
							items:[snifferTree],
							title:'嗅探器',
							border:false,
							autoScroll:true,
							iconCls:'subnet'
						},{
							items:[policyTree],
							title:'策略',
							border:false,
							autoScroll:true,
							iconCls:'policy'
						},{
							items:[systemTree],
							title:'系统',
							border:false,
							autoScroll:true,
							iconCls:'info'
						}]
					},{
						region:'center',
						margins:'5 5 5 0',

						layout:'fit',
						autoScroll:false,
						items:[{
							columnWidth:0,
							baseCls:'x-plain',
							bodyStyle:'padding:0 0 0 0',
							layout:'fit',
							items:[tabs]
						}]
					}]
				});

			AddMainTab("1", tabs)
			}
			);
		</script>
	</head>
	<body>
	</body>
</html>
	